package servlet;

import java.util.Date;
import java.util.LinkedList;

public class Test {
 public static LinkedList<Item> setItemList(){
	 LinkedList<Item> itemList = new LinkedList<Item>();
	 for(int i = 0; i < 10; i++){
		 itemList.add(Test.setItemDetail(String.valueOf(i)));
	 }
	 return itemList;
 }
 public static Item setItemDetail(String iid){
		Message m1 = new Message("bob", new Date(),"hello");
		Message m2 = new Message("alice", new Date(),"hello, World");
		Message m3 = new Message("tom", new Date(),"heihei");
		Message m4 = new Message("shenlong", new Date(),"I am stupid");
		LinkedList<Message> messageList = new LinkedList<Message>();
		messageList.add(m1);
		messageList.add(m2);
		messageList.add(m3);
		messageList.add(m4);
		Item i = new Item(iid, "iphone", "/CS646/img/item"+iid+".jpg", "DaoXiaoMian", "10" ,messageList);
		return i;
 }
}
